using System;
using System.Collections.Generic;
using MvcCms.Data;
using MvcCms.Data.Entities;

namespace MvcCms.Service
{
    public interface IAccountService
    {
        //User Methods
        IEnumerable<DTOContributor> ListContributors();
        string GetUserName();
        User GetUser();
        User GetUser(Guid userId);
        User GetUser(string userName);
        User GetUserByOpenId(string openId);
        //These do not use the shared datacontext of the rest of the app
        //and are used by the membership service
        User GetUser_MPCtxt(Guid userId);
        User GetUser_MPCtxt(string userName);

        User GetUserByEmail(string email);
        bool EditUserEntity(User userToEdit);
        bool EditUser(User user);
        bool DeleteUser(string userName);
        IEnumerable<User> ListUsers(int pageIndex, int pageSize);
        IEnumerable<User> ListUsers();
        IEnumerable<User> ListUsers4Ajax();
        IEnumerable<User> ListUsersWithProfile();
        int GetNumberOfUsersOnline(int timewindow);
        IEnumerable<User> SearchUsers4Ajax(string columnName, string searchTerm);
        bool CreateUser(User userToCreate);

        //Profile Methods
        Profile GetProfile(Guid userKey);
        Profile GetProfile(int profileId);
        bool SetProfileData(Profile profileToEdit);

        //Role Methods
        IEnumerable<DTOUserRole> ListUsersInRole(string roleName);
        IEnumerable<User> ListUsersNotInRole(string roleName);
        Role GetRole(string loweredRoleName);
        Role GetRole(Guid roleId);
    }
}